<?
  session_start();
  require_once("../core.php");

  get_all_variables();


 if (@$submitted==1) {
   
  $admin_username = "turan";
  $admin_password = "openoli_23";
  
  $username = addslashes($username);
  $password = addslashes($password);
  
  if (($username==$admin_username)&&($password==$admin_password)) 
  {
    $_SESSION['panel'] = "1";
	header('Location: table.php'); exit;
  }
  else
  { header('Location: login.php'); exit;} 
 
 }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>openOli Jury | Log in</title>
<link rel="icon" href="img/favicon.png" type="image/png" />
<link href="../css/yahoo_reset.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="../css/forms.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
        $(".pInfo").mouseover(function() { this.id="pInfoOn"})
        $(".pInfo").mouseout(function() { this.id=""})
        setInterval(function(){$("#timebox").load("time.php");}, 30000);
        })
</script>

<script type="text/javascript">
 function turnOnBg (elm) {
   elm.style.backgroundColor = "#FFFFFF";
 }

  function turnOffBg (elm) {
   elm.style.backgroundColor = "#FFFF99";
 }
</script>
</head>

<body>
  <!-- openOli::Contest | Turan Rustamli -->
  <div id="page">
  
    
	<div id="header">
	   <div id="logo"><a href="#"><img src="img/logo.jpg" alt="openOli" border="0"></a></div> 	    
	   <div id="topmenu">
           
	   </div> 	    
	   <div id="toolbox">		  
		  <div id="timebox">
	          <? include('time.php'); ?>
		  </div>
		</div> 	    
	</div>
	
	<div id="content">
	   <table width="100%" border="0" cellspacing="2">
		<tr>
			<td>
               <p class="p_section">Log in</p>
			   <form action="login.php" method="post">
			     <label for="username" class="hm_smallfont">Username: </label><input name="username" type="text" id="username" class="hm_input" onfocus="turnOnBg(this)" onblur="turnOffBg(this)" /><br />

			     <label for="password" class="hm_smallfont">Password: </label><input name="password" type="password" id="password" class="hm_input" onfocus="turnOnBg(this)" onblur="turnOffBg(this)" /><br /><br />

                 <input type="submit" value="Login" style="font-size: 22px; margin-left: 103px;" />
		         <input type="hidden" value="1" name="submitted" id="submitted" />
               </form>
               <br /><br />
			</td>
			<td id="sidebar" height="520">
			   <p class="p_title">Information</p>
			   <p class="p_text"><b>Welcome!</b> 
			   You are at Contest Administration Login page.
			   Please insert your login and password.
			   Don't try to enter Administration Pages without login and password. Contestants have no permissions to view this pages.
			 
			   </p>
		    </td>
		</tr>
       </table>
	</div>	
	
	<div id="bottom"><span id="b_left">&copy; Turan Rustamli - You may use openOli under the terms of the MIT License.</div></div>	
	<br />
  </div>
</body>
</html>
